package com.design.pattern.structuremode.bridge.example;

import javax.swing.*;

/**
 * 结构型模式-桥接模式
 * @author yll
 * @version 1.0.0
 * @date 2024/03/19 15:50
 * @desc 汽车生产接口
 * */
public class CarProduce implements ICar {

    private ICarColor carColor;
    private ICarModel carModel;
    private CarProduce(){};
    public CarProduce(ICarColor carColor, ICarModel carModel){
        this.carColor = carColor;
        this.carModel = carModel;
    }

    public void produce() {
        System.out.println("***********生产开始！************");
        carColor.produce();
        carModel.produce();
        System.out.println("***********生产结束！************");
        System.out.println("");
    }
}
